import vue from "vue";
import Router from "vue-router";
vue.use(Router)
const routes = [
  //404页面
  {
    path: "/notfound",
    component: () => import('../components/notfound.vue')
  },
  // 首页
  {
    path: "/",
    component: () => import('../components/todolist.vue'),
    //子路由
    children: [
      {
        path: 'sona',
        component: () => import('../components/comm/sona.vue')
      }
    ]
  },
  {
    path: "*",
    redirect: '/notfound'
  }
]
const router = new Router({
  routes
})
export default router